#ifndef EMISSIVE_H
#define EMISSIVE_H

#include "material.h"

class Emissive: public Material {
public:
    // constructors, set functions, etc ...
    Emissive(void);
    Emissive(const Emissive& e);

    virtual Material*
    clone(void) const;

    Emissive&
    operator= (const Emissive& rhs);

    virtual
    ~Emissive(void);

    void
    scale_radiance(const float _ls);

    void
    set_ce(const float r, const float g, const float b);

    void
    set_ce(const RGBColor& color);

    virtual RGBColor
    get_Le(ShadeRec& sr) const;

    virtual RGBColor
    shade(ShadeRec& sr);

    virtual RGBColor
    area_light_shade(ShadeRec& sr);

    virtual RGBColor
    path_shade(ShadeRec &sr);

    virtual RGBColor
    global_shade(ShadeRec &sr);

private:
    float		ls;		// radiance scaling factor
    RGBColor 	ce;		// color
};

inline void
Emissive::set_ce(const float r, const float g, const float b) {
    ce.r = r; ce.g = g; ce.b = b;
}

inline void
Emissive::set_ce(const RGBColor &color) {
    ce.r = color.r; ce.g = color.g; ce.b = color.b;
}

inline void
Emissive::scale_radiance(const float _ls) {
    ls = _ls;
}

#endif // EMISSIVE_H
